SegmentTransport

class SegmentTransport(analytics: Analytics) : Transport

Delivers events through Segment's analytics-kotlin SDK.

Stamping happens inside Segment's pipeline (a Before plugin), so sequence numbers match the order events are enqueued — including events the Segment SDK generates itself, such as Application Opened. The envelope's event_id replaces Segment's messageId, which makes Segment's message deduplication work on Autograph ids.

event_id/messageId stability across a Segment-level retry follows from when stamping happens: AutographPlugin runs once, synchronously, while the event is still being enqueued — before it is written to Segment's local retry queue. A later retry resends that already-serialized payload; it does not re-enqueue the event or re-run Before plugins, so there is nothing left in the retry path that could reassign messageId. AutographPlugin.execute is additionally idempotent (see its KDoc) as a defensive guarantee for this same property, independent of that architectural argument.

Constructors

Link copied to clipboard
constructor(analytics: Analytics)

Properties

Link copied to clipboard
open override val stampsInPipeline: Boolean

Functions

Link copied to clipboard
open override fun connect(envelopes: EnvelopeSource)
Link copied to clipboard
open override fun flush()
Link copied to clipboard
open override fun identify(userId: String, traits: JsonObject, envelope: Envelope?)
Link copied to clipboard
open override fun reset()
Link copied to clipboard
open override fun screen(name: String, properties: JsonObject, envelope: Envelope?)
Link copied to clipboard
open override fun track(name: String, properties: JsonObject, envelope: Envelope?)